import request from '@/utils/request'

// 查询学员列表
export function listStudent(query) {
  return request({
    url: '/puyu/student/list',
    method: 'get',
    params: query
  })
}

// 查询学员消课列表
export function listLesson(query) {
  return request({
    url: '/puyu/student/listLesson',
    method: 'get',
    params: query
  })
}

// 查询学员体能测试列表
export function listStrengthTest(query) {
  return request({
    url: '/puyu/student/listStrengthTest',
    method: 'get',
    params: query
  })
}

// 查询学员详细
export function getStudent(studentId) {
  return request({
    url: '/puyu/student/' + studentId,
    method: 'get'
  })
}

// 新增学员
export function addStudent(data) {
  return request({
    url: '/puyu/student',
    method: 'post',
    data: data
  })
}

// 修改学员
export function updateStudent(data) {
  return request({
    url: '/puyu/student',
    method: 'put',
    data: data
  })
}

// 删除学员
export function delStudent(studentId) {
  return request({
    url: '/puyu/student/' + studentId,
    method: 'delete'
  })
}

// 查询学员用户列表
export function listStudentUser() {
  return request({
    url: '/puyu/student/studentUserList',
    method: 'get'
  })
}

// 查询学员用户列表
export function listStudentParentUser() {
  return request({
    url: '/puyu/student/studentParentUserList',
    method: 'get'
  })
}

// 查询学员用户列表
export function getStudentCode() {
  return request({
    url: '/puyu/student/getStudentCode',
    method: 'get'
  })
}

// 查询学员列表
export function listStudents() {
  return request({
    url: '/puyu/student/studentList',
    method: 'get'
  })
}

// 查询体能测试学员列表
export function listTestStudents() {
  return request({
    url: '/puyu/student/testStudentList',
    method: 'get'
  })
}

// 查询有效期内的学员列表
export function listNotExpiredStudents() {
  return request({
    url: '/puyu/student/listNotExpiredStudents',
    method: 'get'
  })
}

// 获取学员姓名
export function listStudentNames(data) {
  return request({
    url: '/puyu/student/listStudentNames',
    method: 'post',
    data: data
  })
}
